package com.zxj.ds.mybatis.dao.saas;


import com.framework.msg.db.WeichatAccount;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

//@SaasDao
@Mapper
public interface DbSaasDao {

    @Select("select * from weichat_user limit 50")
    List<Map<String, Object>> getUsers();

    @Select("select * from weichat_account limit 50")
    List<WeichatAccount> getAccounts();

    @Insert("INSERT INTO `saas`.`app_version` (`id`, `name`, `version`, `can_use_version`, `update_url`, `create_time`, `update_time`, `desc`, `fileSize`) VALUES (#{id}, #{name}, '1.0.4', '1.0.3', 'http://www.kindpetro.com.cn/admin/sqf.apk', '2017-04-18 11:09:49', '2017-04-18 11:09:52', '1，优化页面显示； \\r\\n2，修复Bug。', '0');\n")
    boolean addApp(@Param("id") String id,@Param("name") String name);
}
